package ui.listener;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import ui.panel.LehrerPanel;

public class LehrerListener implements ActionListener  
{

	private LehrerPanel panel;
	
	public LehrerListener(LehrerPanel panel) {
		this.panel = panel;
	}

	
	
	@Override
	public void actionPerformed(ActionEvent e) {
		
		String action_command = e.getActionCommand();
		
		if(action_command.equals("erstellen")){
			this.panel.add();
		} else if(action_command.equals("loeschen")) {
			this.panel.remove();
		}
		
	}

}
